package com.meisupic.copyright.domain.po;

import java.sql.Timestamp;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "abn_goods")
public class AbnGoodsPo {

  private Integer id;
  private String title;
  private String dci;
  private Integer height;
  private Integer width;
  private String type;
  private String right;
  private String author;
  private String img;
  private String vectImg;
  private String maxImg;
  private String wechatImg;
  private String bannerImg;
  private String dciPdf;
  private String keywords;
  private Integer authorId;
  private Integer copyrightHolder;
  private Timestamp addTime;
  private Integer score;

  @Id
  @Column(name = "id", nullable = false)
  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  @Basic
  @Column(name = "title", nullable = false, length = 255)
  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  @Basic
  @Column(name = "dci", nullable = false, length = 255)
  public String getDci() {
    return dci;
  }

  public void setDci(String dci) {
    this.dci = dci;
  }

  @Basic
  @Column(name = "height", nullable = false)
  public Integer getHeight() {
    return height;
  }

  public void setHeight(Integer height) {
    this.height = height;
  }

  @Basic
  @Column(name = "width", nullable = false)
  public Integer getWidth() {
    return width;
  }

  public void setWidth(Integer width) {
    this.width = width;
  }

  @Basic
  @Column(name = "type", nullable = false, length = 16)
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  @Basic
  @Column(name = "right", nullable = false, length = 32)
  public String getRight() {
    return right;
  }

  public void setRight(String right) {
    this.right = right;
  }

  @Basic
  @Column(name = "author", nullable = false, length = 32)
  public String getAuthor() {
    return author;
  }

  public void setAuthor(String author) {
    this.author = author;
  }

  @Basic
  @Column(name = "img", nullable = false, length = 255)
  public String getImg() {
    return img;
  }

  public void setImg(String img) {
    this.img = img;
  }

  @Basic
  @Column(name = "vect_img", nullable = false, length = 255)
  public String getVectImg() {
    return vectImg;
  }

  public void setVectImg(String vectImg) {
    this.vectImg = vectImg;
  }

  @Basic
  @Column(name = "max_img", nullable = false, length = 255)
  public String getMaxImg() {
    return maxImg;
  }

  public void setMaxImg(String maxImg) {
    this.maxImg = maxImg;
  }

  @Basic
  @Column(name = "wechat_img", nullable = false, length = 255)
  public String getWechatImg() {
    return wechatImg;
  }

  public void setWechatImg(String wechatImg) {
    this.wechatImg = wechatImg;
  }

  @Basic
  @Column(name = "banner_img", nullable = false, length = 255)
  public String getBannerImg() {
    return bannerImg;
  }

  public void setBannerImg(String bannerImg) {
    this.bannerImg = bannerImg;
  }

  @Basic
  @Column(name = "dci_pdf", nullable = false, length = 255)
  public String getDciPdf() {
    return dciPdf;
  }

  public void setDciPdf(String dciPdf) {
    this.dciPdf = dciPdf;
  }

  @Basic
  @Column(name = "keywords", nullable = false, length = 255)
  public String getKeywords() {
    return keywords;
  }

  public void setKeywords(String keywords) {
    this.keywords = keywords;
  }

  @Basic
  @Column(name = "author_id", nullable = false)
  public Integer getAuthorId() {
    return authorId;
  }

  public void setAuthorId(Integer authorId) {
    this.authorId = authorId;
  }

  @Basic
  @Column(name = "copyright_holder", nullable = false)
  public Integer getCopyrightHolder() {
    return copyrightHolder;
  }

  public void setCopyrightHolder(Integer copyrightHolder) {
    this.copyrightHolder = copyrightHolder;
  }

  @Basic
  @Column(name = "add_time", nullable = false)
  public Timestamp getAddTime() {
    return addTime;
  }

  public void setAddTime(Timestamp addTime) {
    this.addTime = addTime;
  }

  @Basic
  @Column(name = "score", nullable = false)
  public Integer getScore() {
    return score;
  }

  public void setScore(Integer score) {
    this.score = score;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AbnGoodsPo that = (AbnGoodsPo) o;
    return Objects.equals(id, that.id) &&
        Objects.equals(title, that.title) &&
        Objects.equals(dci, that.dci) &&
        Objects.equals(height, that.height) &&
        Objects.equals(width, that.width) &&
        Objects.equals(type, that.type) &&
        Objects.equals(right, that.right) &&
        Objects.equals(author, that.author) &&
        Objects.equals(img, that.img) &&
        Objects.equals(vectImg, that.vectImg) &&
        Objects.equals(maxImg, that.maxImg) &&
        Objects.equals(wechatImg, that.wechatImg) &&
        Objects.equals(bannerImg, that.bannerImg) &&
        Objects.equals(dciPdf, that.dciPdf) &&
        Objects.equals(keywords, that.keywords) &&
        Objects.equals(authorId, that.authorId) &&
        Objects.equals(copyrightHolder, that.copyrightHolder) &&
        Objects.equals(addTime, that.addTime) &&
        Objects.equals(score, that.score);
  }

  @Override
  public int hashCode() {

    return Objects
        .hash(id, title, dci, height, width, type, right, author, img, vectImg, maxImg, wechatImg,
            bannerImg, dciPdf, keywords, authorId, copyrightHolder, addTime, score);
  }
}
